<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			$("#submit").click(function(e){
				e.preventDefault();
				var today = new Date();
				var name = $("#name").val();
				var price = $("#price").val();
				var amount = $("#amount").val();
				var str = `<div class = "card">
							<div class = "card-body">
							<h5 class = "card-title">
							${today.getFullYear()}年${
								today.getMonth() + 1
							}月${today.getDate()}日
							</h5>
				<p class = "card-text">物资: ${name},单价:${price}元,数量:${amount}</p>
				<p class = "card-text">共计: ${price * amount}元</p>
							</div>
						</div>
					$("#history-list").prepend($(str));
					$("#form"){0}.reset();
			});
		</script>
	</body>
</html>
